---
title: "SSH"
categories:
- linux
tags:
---

<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org6310353">退出卡住的SSH进程</a></li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-org6310353">
<h2 id="org6310353">退出卡住的SSH进程</h2>
<div class="outline-text-2" id="text-org6310353">
<blockquote>
<p>
<a href="https://www.golinuxcloud.com/kill-disconnect-hung-ssh-session-linux/">https://www.golinuxcloud.com/kill-disconnect-hung-ssh-session-linux/</a>
</p>
</blockquote>
<p>
From the frozen session terminal, hit these keys in order: Enter → ~ → . The tilde (only after a newline) is recognised as an escape sequence by the ssh client, and the period tells the client to terminate it's business without further ado.
</p>
<p>
SSH的转义：
ESCAPE CHARACTERS
     When a pseudo-terminal has been requested, ssh supports a number of functions through the use of an escape character.
</p>
<p>
A single tilde character can be sent as ~ or by following the tilde by a character other than those described below.  The escape character must always follow a newline to be interpreted as special.  The escape character can be changed in configuration files using the EscapeChar configuration directive or on the command line by the -e option.
</p>
<p>
The supported escapes (assuming the default ‘~’) are:
~.      Disconnect.	 
~^Z     Background ssh.
~#      List forwarded connections.
</p>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="author">Author: gdme1320</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
